package com.steel.yfmall.cloud.assistant.controller;

import com.steel.yfmall.cloud.assistant.contract.ContractBaseService;
import com.steel.yfmall.cloud.assistant.dto.para.contract.ParaAccountFramewordBean;
import com.steel.yfmall.cloud.assistant.dto.para.contract.ParaContractBaseBean;
import com.steel.yfmall.cloud.assistant.dto.para.contract.ParaFrameworkContractInfoBean;
import com.steel.yfmall.cloud.components.utils.base.APIMsgBean;
import org.springframework.web.bind.annotation.RequestBody;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RestController;

import javax.annotation.Resource;
import java.util.List;

@RestController
public class SaleContractController {

    @Resource
    private ContractBaseService contractBaseService;

    /**
     * 苍穹修改合同信息,将合同信息同步电商,生效结果同步电商
     *
     * @param paraContractBaseBean
     * @return com.steel.yfmall.cloud.components.utils.base.APIMsgBean<java.lang.Boolean>
     * @author 张兆民
     * @date 2021/3/28 9:34
     */
    @RequestMapping("/synchronizeContract")
    public APIMsgBean<Boolean> saleContractInfo(@RequestBody ParaContractBaseBean paraContractBaseBean) {
        return contractBaseService.contractInfo(paraContractBaseBean);
    }

    /**
     * 苍穹同步合同关联资金账户信息到电商
     * @param paraAccountFramewordBean
     * @return
     */
    @RequestMapping("/pushAccountFrameword")
    public APIMsgBean<Boolean> pushAccountFrameword(@RequestBody ParaAccountFramewordBean paraAccountFramewordBean) {
        return contractBaseService.pushAccountFrameword(paraAccountFramewordBean);
    }

    /**
     * 苍穹推送电商合同状态变更接口
     * @param paraFrameworkContractInfoBean
     * @return
     */
    @RequestMapping("/closeFrameworkContractInfo")
    public APIMsgBean<Boolean> closeFrameworkContractInfo(@RequestBody ParaFrameworkContractInfoBean paraFrameworkContractInfoBean) {
        return contractBaseService.closeFrameworkContractInfo(paraFrameworkContractInfoBean);
    }




}
